﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;


public partial class Site : BaseMaster
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Page.DataBind();
        
        //MenuItem menuItem = null;
        if (isLogin())
        {
            //LinkBLogin.Visible = false;
            //LinkButton1.Visible = true;
            //LinkBLogin.PostBackUrl = "~/Default.aspx";
          //  lblUserName.Text = "Welcome " + LoginedMember.Name;
            //Clear Items
            //NavigationMenu.Items.Clear();

            //menuItem = new MenuItem();
            //menuItem.Text = "History";
            //menuItem.NavigateUrl = "~/PackageHistory.aspx";
            //NavigationMenu.Items.Add(menuItem);

            //menuItem = new MenuItem();
            //menuItem.Text = "New Shipment";
            //menuItem.NavigateUrl = "~/NewShipment.aspx";
            //NavigationMenu.Items.Add(menuItem);

            //menuItem = new MenuItem();
            //menuItem.Text = "Update Detail";
            //menuItem.NavigateUrl = "~/UpdateCustomer.aspx";
            //NavigationMenu.Items.Add(menuItem);



        }
        else
        {
            //LinkBLogin.Visible = true;
            //LinkButton1.Visible = false;
            //lblUserName.Text = "Please";
            //Clear Items
            //NavigationMenu.Items.Clear();

            //menuItem = new MenuItem();
            //menuItem.Text = "Home";
            //menuItem.NavigateUrl = "~/Default.aspx";
            //NavigationMenu.Items.Add(menuItem);

            //menuItem = new MenuItem();
            //menuItem.Text = "New Shipment";
            //menuItem.NavigateUrl = "~/NewShipment.aspx";
            //NavigationMenu.Items.Add(menuItem);
        }
    }
    protected void LinkBLogin_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/index.aspx");
    }
    protected void LinkBLogin2_Click(object sender, EventArgs e)
    {
        Session.Clear();
        Response.Redirect("~/index.aspx");
    }
}